<?php
$request = Zend_Controller_Front::getInstance()->getRequest();
$action = $request->getActionName();
$controller = $request->getControllerName();

?>
<div id="sidebar">
    <div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->

        <h1 id="sidebar-title"><a href="/">Admin</a></h1>

        <!-- Logo (221px wide) -->
        <a href="/"><img id="logo" src="admin_/images/logo.png" alt="Simpla Admin logo"/></a>

        <ul id="main-nav">  <!-- Accordion Menu -->
            <li>
                <a href="/" class="nav-top-item <?= $controller == 'admin_index' ? 'current' : ''  ?>">
                    <!-- Add the class "current" to current menu item -->
                    Admins panel
                </a>
                <ul>
                    <li><a href="/">On site</a></li>
                </ul>
            </li>

            <li>
                <a href="/articles" class="nav-top-item <?= $controller == 'articles' ? 'current' : ''  ?>">
                    Articles
                </a>
                <ul>
                    <li><a href="articles/add">Write new</a></li>
                    <li><a href="articles">Management articles</a></li>

                </ul>
            </li>

            <li>
                <a href="/pages" class="nav-top-item <?= $controller == 'pages' ? 'current' : ''  ?>">
                    Pages
                </a>
                <ul>
                    <li><a href="/pages/add">Add new</a></li>
                    <li><a href="/pages">Management pages</a></li>

                </ul>
            </li>

             <li>
                <a href="/roles" class="nav-top-item <?= $controller == 'roles' ? 'current' : ''  ?>">
                    Roles
                </a>
                <ul>
                    <li><a href="/roles/add">Add new</a></li>
                    <li><a href="/roles">Management roles</a></li>

                </ul>
            </li>
        </ul>


    </div>
</div>